//
// Created on 2025/1/22.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".

#ifndef camera_td_imagedeal_H
#define camera_td_imagedeal_H

//C标准库
#include <dlfcn.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>

// C++标准库
#include <vector>
#include <string>
#include <sstream>

// OpenHarmony系统库
#include "napi/native_api.h"
#include "hilog/log.h"
#include "rawfile/raw_file.h"

// 第三方库
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <net.h>

//自定义库
#include "nle/nle_file.h"



int GetAllInputParam(napi_env env, napi_callback_info info, 
    cv::Mat& img, std::vector<unsigned char>& model, std::vector<std::string>& label, std::string& appPath);
int GetImageDate(napi_env env, napi_callback_info info, cv::Mat &img);
int GetNcnnParam(napi_env env, napi_callback_info info, std::string &appPath);


//int AI_ModelCreate(napi_env env, napi_callback_info info);
//int AI_ImageDeal(napi_env env, napi_callback_info info, cv::Mat &outMat);
int AI_ModelDelete(napi_env env, napi_callback_info info);

//NCNN模型初始化 对应图像传入参数
int GetImageData(napi_env env,napi_callback_info info, cv::Mat &img);
int NCNN_ModelCreate(napi_env env, napi_callback_info info);
int NcNN_ImageDeal(napi_env env, napi_callback_info info,cv::Mat &outMat);
int Rtsp_displayvideo(napi_env env, napi_callback_info info, cv::Mat &outMat);
int Rtsp_Clear(napi_env env, napi_callback_info info);
int NcNN_ImageDeal_Rtsp(napi_env env, napi_callback_info info, cv::Mat &srcMat, cv::Mat &outMat); //对应处理NCNN图像流
std::string AI_GetErrMsg(); //对应AI获取错误消息
std::string AI_ModelGetResults();
void AI_ModelResultsClear();

#endif //camera_td_imagedeal_H
